/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package io.renren.modules.app.service.impl;


import io.renren.modules.app.entity.UserEntity;
import io.renren.modules.app.entity.UserTokenEntity;
import io.renren.modules.app.service.UserService;
import io.renren.modules.app.service.AppShiroService;
import io.renren.modules.app.service.UserTokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AppAppShiroServiceImpl implements AppShiroService {
    @Autowired
    private UserService userService;
    @Autowired
    private UserTokenService userTokenService;

    @Override
    public UserTokenEntity queryByToken(String token) {
        return userTokenService.queryByToken(token);
    }

    @Override
    public UserEntity queryUser(Long userId) {
        return userService.getById(userId);
    }
}
